﻿<script id="template-emptyScreen" type="text/x-jquery-tmpl">
    <div id="${ID}" class="noContentBlock emptyScrCtrl{{if typeof(CssClass)!="undefined"}} ${CssClass}{{/if}}">
        {{if typeof(ImgSrc)!="undefined" && ImgSrc != null && ImgSrc != ""}}
        <table>
            <tr>
                <td>
                    <img src="${ImgSrc}" alt="" class="emptyScrImage"/>
                </td>
                <td>
                    <div class="emptyScrTd">
                        {{/if}}
                        {{if typeof(Header)!="undefined" && Header != null && Header != ""}}
                        <div class="header-base-big">${Header}</div>
                        {{/if}}
                        {{if typeof(HeaderDescribe)!="undefined" && HeaderDescribe != null && HeaderDescribe != ""}}
                        <div class="emptyScrHeadDscr">${HeaderDescribe}</div>
                        {{/if}}
                        {{if typeof(Describe)!="undefined" && Describe != null && Describe != ""}}
                        <div class="emptyScrDscr">{{html Describe}}</div>
                        {{/if}}
                        {{if typeof(ButtonHTML)!="undefined" && ButtonHTML != null && ButtonHTML != ""}}
                        <div class="emptyScrBttnPnl">{{html ButtonHTML}}</div>
                        {{/if}}
                        {{if typeof(ImgSrc)!="undefined" && ImgSrc != null && ImgSrc != ""}}
                    </div>
                </td>
            </tr>
        </table>
        {{/if}}
    </div>
</script>

<script id="template-blockUIPanel" type="text/x-jquery-tmpl">
    <div style="display: none;" id="${id}">
        <div class="popupContainerClass">
            <div class="containerHeaderBlock">
                <table cellspacing="0" cellpadding="0" border="0" style="width: 100%; height: 0px;">
                    <tbody>
                    <tr valign="top">
                        <td {{if typeof(headerClass) !="undefined" && headerClass !=""}}class="${headerClass}"{{/if}}>${headerTest}</td>
                        <td class="popupCancel">
                            <div onclick="PopupKeyUpActionProvider.CloseDialog();" class="cancelButton" title="${ASC.Resources.Master.TemplateResource.CloseButton}">&times;</div>
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
            <div class="infoPanel{{if typeof(infoType) != "undefined" && infoType !=""}} ${infoType}{{/if}}"
                 {{if typeof(infoMessageText) == "undefined" || infoMessageText== ""}}style="display: none;"{{/if}}>
                <div>{{if typeof(infoMessageText) != "undefined" && infoMessageText != ""}}${infoMessageText}{{/if}}</div>
            </div>
            <div class="containerBodyBlock">
                {{if typeof(questionText) != "undefined" && questionText != ""}}
                <div>
                    <b>${questionText}</b>
                </div>
                {{/if}}

                {{html innerHtmlText}}

                {{if typeof(OKBtn) != 'undefined' && OKBtn != "" || typeof(OtherBtnHtml) != 'undefined' || typeof(CancelBtn) != 'undefined' && CancelBtn != ""}}
                <div class="middle-button-container">
                    {{if typeof(OKBtn) != 'undefined' && OKBtn != ""}}
                    <a class="button blue middle{{if typeof(OKBtnClass) != 'undefined'}} ${OKBtnClass}{{/if}}"
                       {{if typeof(OKBtnID) !='undefined'}}id="${OKBtnID}"{{/if}}
                       {{if typeof(OKBtnHref) !='undefined' && OKBtnHref !=""}} href="${OKBtnHref}"{{/if}}>
                        ${OKBtn}
                    </a>
                    <span class="splitter-buttons"></span>
                    {{/if}}
                    {{if typeof(OtherBtnHtml) != 'undefined'}}
                    {{html OtherBtnHtml}}
                    <span class="splitter-buttons"></span>
                    {{/if}}
                    {{if typeof(CancelBtn) != 'undefined' && CancelBtn != ""}}
                    <a class="button gray middle{{if typeof(CancelBtnClass) != 'undefined'}} ${CancelBtnClass}{{/if}}"
                       {{if typeof(CancelBtnID) !='undefined'}}id="${CancelBtnID}"{{/if}}
                       onclick="PopupKeyUpActionProvider.EnableEsc = true; jq.unblockUI();">
                        ${CancelBtn}
                    </a>
                    {{/if}}
                </div>
                {{/if}}
            </div>
        </div>
    </div>
</script>

<script id="template-newFile" type="text/x-jquery-tmpl">
    <tr class="newDoc">
        <td class="${tdclass}" colspan="2">
            <input id="newDocTitle" type="text" class="textEdit" data="${ASC.Resources.Master.UserControlsCommonResource.NewDocument}" maxlength="165" value="${ASC.Resources.Master.UserControlsCommonResource.NewDocument}"/>
            <span id="${type}" onclick="${onCreateFile}" class="button gray btn-action __apply createFile" title="${ASC.Resources.Master.TemplateResource.AddButton}"></span>
            <span onclick="${onRemoveNewDocument}" title="${ASC.Resources.Master.UserControlsCommonResource.QuickLinksDeleteLink}" class="button gray btn-action __reset remove"></span>
        </td>        
    </tr>
</script>
<script id="template-fileAttach" type="text/x-jquery-tmpl">
    <tr>
        <td id="af_${id}">
            {{if type=="image"}}
                <a href="${viewUrl}" rel="imageGalery" class="screenzoom ${exttype}" title="${title}">
                    <div class="attachmentsTitle">${title}</div>
                    {{if versionGroup > 1}}
                        <span class="version">${ASC.Resources.Master.UserControlsCommonResource.Version}${versionGroup}</span>
                    {{/if}}
                </a>
            {{else}}
                {{if type=="media"}}
                    <a href="${viewUrl}" class="mediafile ${exttype}" title="${title}">
                        <div class="attachmentsTitle">${title}</div>
                        {{if versionGroup > 1}}
                            <span class="version">${ASC.Resources.Master.UserControlsCommonResource.Version}${versionGroup}</span>
                        {{/if}}
                    </a>
                {{else}}
                    {{if type == "editedFile" || type == "viewedFile"}}
                        <a href="${docEditUrl}" class="${exttype}" title="${title}" target="_blank">
                            <div class="attachmentsTitle">${title}</div>
                            {{if versionGroup > 1}}
                                <span class="version">${ASC.Resources.Master.UserControlsCommonResource.Version}${versionGroup}</span>
                            {{/if}}
                        </a>
                    {{else}}
                        <a href="${viewUrl}" class="${exttype} noEdit" title="${title}" target="_blank">
                            <div class="attachmentsTitle">${title}</div>
                            {{if versionGroup > 1}}
                                <span class="version">${ASC.Resources.Master.UserControlsCommonResource.Version}${versionGroup}</span>
                            {{/if}}
                        </a>
                    {{/if}}
                {{/if}}
            {{/if}}
        </td>
    
        <td class="editFile">
            {{if (access==0 || access==1)}}
                <a class="{{if trashAction == "delete"}}deleteDoc{{else}}unlinkDoc{{/if}}" title="{{if trashAction == "delete"}}${ASC.Resources.Master.UserControlsCommonResource.DeleteFile}{{else}}${ASC.Resources.Master.UserControlsCommonResource.RemoveFromList}{{/if}}" data-fileId="${id}"></a>
            {{/if}}
            {{if (!jq.browser.mobile)}}
            <a class="downloadLink" title="${ASC.Resources.Master.UserControlsCommonResource.DownloadFile}" href="${viewUrl}"></a>
            {{/if}}
            {{if (type == "editedFile")&&(access==0 || access==1)}}
                <a id="editDoc_${id}" title="${ASC.Resources.Master.UserControlsCommonResource.EditFile}" target="_blank" href="${editUrl}"></a>
            {{/if}}
        </td>
    </tr>
</script>

<script id="template-accountLinkCtrl" type="text/x-jquery-tmpl">
    <ul class="account-links tabs-content">
        {{each(i, acc) infos}}
        <li class="${acc.Provider}{{if acc.Linked == true}} connected{{/if}} ${lang}">
            <span class="icon {{if disable == true}}opacity{{/if}}"></span>
            <span>
                {{if acc.Linked == true}}
                    ${ASC.Resources.Master.TemplateResource.AssociateAccountConnected}
                {{else}}
                    ${ASC.Resources.Master.TemplateResource.AssociateAccountNotConnected}
                {{/if}}
            </span> 
            <a {{if disable != true}}href="${acc.Url}"{{/if}}  class="popup{{if acc.Linked == true}} linked{{/if}} {{if disable == true}}disable{{/if}}" id="${acc.Provider}">
                {{if acc.Linked == true}}
                    ${ASC.Resources.Master.TemplateResource.AssociateAccountDisconnect}
                {{else}}
                    ${ASC.Resources.Master.TemplateResource.AssociateAccountConnect}
                {{/if}}
            </a>
        </li>
        {{/each}}
    </ul>
</script>

<script id="template-mailCalendar" type="text/x-jquery-tmpl">
    <div style="background-color: #fff; width: 600px; margin: 0 auto; text-align: left;">
        <table cellspacing="0" cellpadding="0" style="font-family: 'Open Sans', Tahoma, Arial; font-size: 14px; color: #333; background: #fff; text-align: center; width: 600px; margin: 0; padding: 0; border: 0 none; border-collapse: collapse; empty-cells: show; border-spacing: 0;">
            <tbody>
            <tr border="0" cellspacing="0" cellpadding="0">
                <td colspan="3" style="margin: 0; padding: 0; background-color: #fff; height: 65px; padding: 20px 0 0 30px;">
                    <div style="text-align: left; height: 65px; width: 570px; margin: 0; padding: 0;">
                        <a href="${ASC.Resources.Master.UrlMainSite}"
                           style="text-decoration: none; display: inline-block; width: 216px; height: 35px; margin: 0; padding: 0;"
                           target="_blank">
                            <img style="border: 0px none; width: 216px; height: 35px; margin: 0; padding: 0;"
                                 src="${ASC.Resources.Master.LogoDarkUrl}"/>
                        </a>
                    </div>
                </td>
            </tr>
            <tr border="0" cellspacing="0" cellpadding="0">
                <td colspan="3" style="margin: 0; padding: 15px 30px 15px; background-color: #f6f6f6; -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px;">
                    <div style="font-family: 'Open Sans', Tahoma, Arial; font-size: 14px; color: #333; margin: 0; padding: 0; width: 540px; height: auto; overflow: hidden; word-wrap: break-word; vertical-align: top; text-align: left; border: 0 none;">
                        <div style="font-family: 'Open Sans', Tahoma, Arial; font-size: 14px; color: #333; padding: 5px 0 10px 0; width: 540px; overflow: hidden; word-wrap: break-word;">
                            <table cellpadding="0" cellspacing="0" style="font-family: 'Open Sans', Tahoma, Arial; border-collapse: collapse; height: 132px; width: 100%;">
                                <tr>
                                    <td colspan="3" style="padding-bottom: 16px;">
                                        <table cellpadding="0" cellspacing="0" style="font-family: 'Open Sans', Tahoma, Arial; border-collapse: collapse;">
                                            <tbody>
                                            <tr>
                                                <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px; padding-bottom: 8px;">${action}</td>
                                            </tr>
                                            <tr>
                                                <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 24px;">${summary}</td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                                <tr>
                                    <td width="66" height="66" align="left" valign="top" style="width: 66px; height: 66px;">
                                        <img style="border: 0px none; width: 66px; height: 66px; margin: 0; padding: 0;" src="${StudioManager.GetImage('event_66.png')}"/>
                                    </td>
                                    <td style="padding-left: 16px;">
                                        <table cellpadding="0" cellspacing="0" style="font-family: 'Open Sans', Tahoma, Arial; border-collapse: collapse;">
                                            <tbody>
                                                <tr>
                                                    <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px; color: rgb(153, 153, 153);">${ASC.Resources.Master.TemplateResource.MailIcsCalendarWhenLabel}:</td>
                                                    <td style="vertical-align: top; padding-left: 8px; padding-bottom: 8px; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px;" title="${dateEvent}">
                                                        ${dateEvent}
                                                    </td>
                                                </tr>
                                                {{if typeof(rruleText) != 'undefined' && rruleText != '' && rruleText != null }}
                                                <tr>
                                                    <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px; color: rgb(153, 153, 153);">${ASC.Resources.Master.TemplateResource.MailIcsCalendarRecurrenceLabel}:</td>
                                                    <td style="vertical-align: top; padding-left: 8px; padding-bottom: 8px; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px;" title="${dateEvent}">
                                                        ${rruleText}
                                                    </td>
                                                </tr>
                                                {{/if}}
                                                <tr>
                                                    <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px; color: rgb(153, 153, 153);">${ASC.Resources.Master.TemplateResource.MailIcsCalendarWhereLabel}:</td>
                                                    <td style="vertical-align: top; padding-left: 8px; padding-bottom: 8px; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px;" {{if typeof(location) !='undefined' && location !=''&& location !=null }} title="${location}" {{/if}}>
                                                        {{if typeof(location) != 'undefined' && location != '' && location != null }}
                                                        ${location}
                                                        {{if typeof(mapUrl) != 'undefined' && mapUrl != '' && mapUrl != null }}
                                                        &nbsp;<a href="${mapUrl}" target="_blank" style="color: #333333;">(${ASC.Resources.Master.TemplateResource.MailIcsCalendarMapLabel})</a>
                                                        {{/if}}
                                                        {{else}}
                                                        ${ASC.Resources.Master.TemplateResource.MailIcsCalendarNoLocationLabel}
                                                        {{/if}}
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px; color: rgb(153, 153, 153);">${ASC.Resources.Master.TemplateResource.MailIcsCalendarWhoLabel}:</td>
                                                    <td style="vertical-align: top; padding-left: 8px; padding-bottom: 8px; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px;">
                                                        {{if orgEmail !== '' }}
                                                        <a title="${orgEmail}" name="${orgName}" href="${mailToHref}" style="color: #333333;">
                                                            {{if typeof(orgName) != 'undefined' && orgName != '' && orgName != null }}
                                                            ${orgName}
                                                            {{else}}
                                                            ${orgEmail}
                                                            {{/if}}
                                                        </a>
                                                        {{else}}
                                                        ${orgName}
                                                        {{/if}}&nbsp;(${ASC.Resources.Master.TemplateResource.MailIcsCalendarOrganizerLabel})
                                                    </td>
                                                </tr>
                                                {{if typeof(description) != 'undefined' && description != '' && description != null }}
                                                <tr>
                                                    <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px; color: rgb(153, 153, 153);" colspan="2">${ASC.Resources.Master.TemplateResource.MailIcsCalendarDescriptionLabel}:</td>
                                                </tr>
                                                <tr>
                                                    <td style="vertical-align: top; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px;" colspan="2">
                                                        <p style="margin-top: 0;"></p>
                                                        {{html description}}
                                                    </td>
                                                </tr>
                                                {{/if}}
                                            </tbody>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </div>
                    </div>
                </td>
            </tr>
            <tr border="0" cellspacing="0" cellpadding="0">
                <td colspan="5" style="width: 600px; vertical-align: top; margin: 0; padding: 20px 30px 15px;">
                    <p style="color: #7b7b7b; font-family: 'Open Sans', Tahoma, Arial; font-size: 12px; margin: 0; padding: 0; text-align: center; width: 540px;">
                        ${ASC.Resources.Master.TemplateResource.MailAutoGeneratedText}
                        <br/>
                        ${ASC.Resources.Master.TemplateResource.AllRightsReservedText}
                    </p>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
</script>

<script id="template-mailReceipt" type="text/x-jquery-tmpl">
    <div style="background-color: #fff; width: 600px; margin: 0 auto; text-align: left;">
        <table cellspacing="0" cellpadding="0" style="font-family: 'Open Sans', Tahoma, Arial; font-style: normal; font-weight: 400; font-size: 14px; color: #333; background: #fff; text-align: center; width: 600px; margin: 0; padding: 0; border: 0 none; border-collapse: collapse; empty-cells: show; border-spacing: 0;">
            <tbody>
                <tr border="0" cellspacing="0" cellpadding="0">
                    <td colspan="3" style="margin: 0; padding: 0; background-color: #fff; height: 65px; padding: 20px 0 0 30px;">
                        <div style="text-align: left; height: 65px; width: 570px; margin: 0; padding: 0;">
                            <a href="http://www.onlyoffice.com/" style="text-decoration: none; display: inline-block; width: 216px; height: 35px; margin: 0; padding: 0;" target= "blank">
                                <img src="${ASC.Resources.Master.LogoDarkUrl}" x-mail-embedded="true" style="border: 0px none; width: 216px; height: 35px; margin: 0; padding: 0;"/>
                            </a>
                        </div>
                    </td>
                </tr>
                <tr border="0" cellspacing="0" cellpadding="0">
                    <td colspan="3" style="margin: 0; padding: 15px 30px 15px; background-color: #f6f6f6; -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px;">
                        <div style="font-family: 'Open Sans', Tahoma, Arial; font-style: normal; font-weight: 400; font-size: 14px; color: #333; margin: 0; padding: 0; width: 540px; height: auto; overflow: hidden; word-wrap: break-word; vertical-align: top; text-align: left; border: 0 none;">
                            <h1 style="color: #333333; font-size: 28px; font-weight: bold; margin: 0">
                                ${receiptLabel}
                            </h1>
                            <br>${user}&nbsp;&lt;<a href="mailto:${mailTo}">${mailTo}</a>&gt;&nbsp;${receiptUserLabel}
                            <br>${dateNow}
                            <br><br>
                            <hr style="color: #C4C4C4;">
                            <br>${sentRequestInfoLabel}
                            <br>${dateSent}<br><br>
                        </div>
                    </td>
                </tr>
            </tbody>
        </table>
    </div>
</script>

<script id="consumerSettingsTmpl" type="text/x-jquery-tmpl">
    <select class="textEdit comboBoxStorage">
        {{each storages}}
        <option value="${id}">${title}</option>
        {{/each}}
    </select>
    {{each storages}}
    {{if id == "S3"}}
    {{tmpl(Object.assign($value, {settingName: $data.settingName, regions: $data.regions, encryptionTypes: $data.encryptionTypes, encryptionMethods: $data.encryptionMethods})) "consumerItemS3Tmpl"}}
    {{else}}
    {{tmpl($value) "consumerItemBaseTmpl"}}
    {{/if}}
    {{/each}}
</script>

<script id="consumerItemBaseTmpl" type="text/x-jquery-tmpl">
    <div data-id="${id}" class="storage display-none">
        {{each properties}}
        <div class="header-base-small headerPanelSmall {{if !isOptional}}requiredTitle{{/if}}">${title}: {{if description}}<span class="HelpCenterSwitcher"></span><span class="popup_helper">${description}</span>{{/if}}</div>
        <input class="textBox textEdit {{if !isOptional}}requiredField{{/if}}" data-id="${name}" type="text" {{if !isSet}}disabled="disabled"{{/if}}>
        {{/each}}
    </div>
</script>

<script id="consumerItemS3Tmpl" type="text/x-jquery-tmpl">
    <div data-id="${id}" class="storage display-none">
        {{each properties}}
        {{if name == "region" && regions.length > 0}}
        <div class="header-base-small headerPanelSmall {{if !isOptional}}requiredTitle{{/if}}">${title}: {{if description}}<span class="HelpCenterSwitcher"></span><span class="popup_helper">${description}</span>{{/if}}</div>
        <select class="textEdit" data-id="${name}" {{if !isSet}} disabled="disabled" {{/if}}>
            {{each(i, region) regions}}
            <option value="${region.systemName}">${region.displayName} (${region.systemName})</option>
            {{/each}}
        </select>
        {{else name == "forcepathstyle" || name == "usehttp"}}
        <div class="clearFix">
            <input type="checkbox" id="${settingName}${name}" data-id="${name}" {{if !isSet}} disabled="disabled" {{/if}} />
            <label for="${settingName}${name}">${title} {{if description}}<span class="HelpCenterSwitcher"></span><span class="popup_helper">${description}</span>{{/if}}</label>
        </div>
        {{else name == "sse"}}
        <div class="header-base-small headerPanelSmall">${title}: {{if description}}<span class="HelpCenterSwitcher"></span><span class="popup_helper">${description}</span>{{/if}}</div>
        <select class="textEdit comboBoxEncryption" {{if !isSet}} disabled="disabled" {{/if}}>
            {{each(i, encryptionType) encryptionTypes}}
            <option value="${encryptionType.id}">${encryptionType.title}</option>
            {{/each}}
        </select>
        <div class="encryption-method display-none">
            {{each(i, method) encryptionMethods}}
            <div class="clearFix">
                <input value="${method.id}" type="radio" id="${settingName}${name}${method.id}" data-id="${name}" name="${settingName}${name}" {{if !isSet}} disabled="disabled" {{/if}} />
                <label for="${settingName}${name}${method.id}">${method.title} {{if method.description}}<span class="HelpCenterSwitcher"></span><span class="popup_helper">${method.description}</span>{{/if}}</label>
            </div>
            {{/each}}
        </div>
        <div class="encryption-kms display-none">
            <div class="header-base-small headerPanelSmall">${ASC.Resources.Master.TemplateResource.ConsumersS3EncryprionCMK}:</div>
            <select class="textEdit" {{if !isSet}} disabled="disabled" {{/if}}>
                <option value="0">${ASC.Resources.Master.TemplateResource.ConsumersS3EncryprionCMKDefault}</option>
                <option value="1">${ASC.Resources.Master.TemplateResource.ConsumersS3EncryprionCMKCustom}</option>
            </select>
        </div>
        <div class="encryption-key display-none">
            <div class="header-base-small headerPanelSmall requiredTitle">${ASC.Resources.Master.TemplateResource.ConsumersS3EncryprionKey}:</div>
            <input class="textBox textEdit requiredField" data-id="ssekey" type="text" {{if !isSet}} disabled="disabled" {{/if}} />
        </div>
        {{else name == "ssekey"}}
        {{else}}
        <div class="header-base-small headerPanelSmall {{if !isOptional}}requiredTitle{{/if}}">${title}: {{if description}}<span class="HelpCenterSwitcher"></span><span class="popup_helper">${description}</span>{{/if}}</div>
        <input class="textBox textEdit {{if !isOptional}}requiredField{{/if}}" data-id="${name}" type="text" {{if !isSet}} disabled="disabled" {{/if}}>
        {{/if}}
        {{/each}}
    </div>
</script>